<template>
  <div>
    <el-card>
      <el-page-header @back="$router.back()" content="孕期计算" />
    </el-card>
    <el-card class="mt-20" header="输入时间">
      <el-form>
        <el-form-item label="时间">
          <el-date-picker v-model="form">
          </el-date-picker>
        </el-form-item>
      </el-form>
    </el-card>
    <el-card class="mt-20" header="结果">
      {{gestation}}
    </el-card>
  </div>
</template>

<script>
import moment from 'moment'
export default {
  data() {
    return {
      form: moment()
    }
  },
  computed: {
    gestation() {
      return moment(this.form).add(9, 'month').add(7, 'day').format('YYYY-MM-DD')
    }
  },
}
</script>

<style>

</style>